package com.yanqu.road.server.cmd.player;

import com.yanqu.road.pb.manor.ManorProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.logic.MessageHelper;
import com.yanqu.road.utils.YanQuMessageUtils;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.C_MANOR_HELP_PLAYER_RESP, desc = "跨服庄园互助响应")
public class CrossManorHelpRespCmd extends CrossCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        ManorProto.CrossHelpPlayerRespMsg reqMsg = ManorProto.CrossHelpPlayerRespMsg.parseFrom(packet.getBytes());

        YanQuMessage pbMsg = YanQuMessageUtils.buildMessage(Protocol.S_CROSS_MANOR_HELP_RESP, reqMsg.toBuilder());
        MessageHelper.sendPacket(reqMsg.getServerId(), reqMsg.getUserId(), pbMsg);
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {

    }

    @Override
    public void sendData() {

    }
}
